#{extends 'CRUD/layout.html' /}
#{set title:messages.get('complaintTypes.add') /}

<div id="crudBlank" class="${type.name}">

    <h2 id="crudBlankTitle">&{'complaintTypes.add'}</h2>

    <div class="objectForm">
    #{form action:@create(), enctype:'multipart/form-data'}
        #{crud.form fields:['complaintTypeName', 'multyplier', 'syndrome'] }
			#{crud.custom 'syndrome'}
        	   <label for="${syndrome}">&{'syndrome'}</label>
		       #{select 'object.syndrome.syndromeId', items:models.Syndrome.findAll(), valueProperty:'syndromeId', 
		       		labelProperty:'name', value:object.syndrome, id:'syndromeSelector' /}
        	#{/crud.custom}
        #{/crud.form}
        <p class="crudButtons">
            <input type="submit" name="_save" value="&{'crud.save', type.modelName}" />
            <input type="submit" name="_saveAndContinue" value="&{'crud.saveAndContinue', type.modelName}" />
            <input type="submit" name="_saveAndAddAnother" value="&{'crud.saveAndAddAnother', type.modelName}" />
        </p>
    #{/form}
    </div>

</div>